﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category0
{
  public class MTS12 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;

    [Description("Application Identifier")]
    public Tag101 ApplicationIdentifier_101
    {
      get
      {
        return new Tag101((SwiftElement) this, 0, (SwiftDefinitionElement) MTS12.U0002);
      }
    }

    [Description("Application Identifier")]
    public Tag101 Tag101_ApplicationIdentifier
    {
      get
      {
        return this.ApplicationIdentifier_101;
      }
    }

    [Description("Reason For System Abort")]
    public Tag443 SystemAbortCode_443
    {
      get
      {
        return new Tag443((SwiftElement) this, 0, (SwiftDefinitionElement) MTS12.U0004);
      }
    }

    [Description("Reason For System Abort")]
    public Tag443 Tag443_SystemAbortCode
    {
      get
      {
        return this.SystemAbortCode_443;
      }
    }

    public MTS12()
      : base(true)
    {
    }

    public MTS12(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MTS12.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MTS12.MessageDefinition = new SwiftMessageDefinition("MTS12", "System Remove AP Request");
      MTS12.U0002 = new SwiftTagDefinition("ApplicationIdentifier_101", "Application Identifier");
      MTS12.U0002.TagName = "{101:";
      MTS12.U0003 = new SwiftTagSubItemDefinition("ApplicationIdentifier", "ApplicationIdentifier");
      MTS12.U0002.Elements.Add((SwiftDefinitionElement) MTS12.U0003);
      MTS12.MessageDefinition.Elements.Add((SwiftDefinitionElement) MTS12.U0002);
      MTS12.U0004 = new SwiftTagDefinition("SystemAbortCode_443", "Reason For System Abort");
      MTS12.U0004.TagName = "{443:";
      MTS12.U0005 = new SwiftTagSubItemDefinition("SystemAbortCode", "Reason For System Abort");
      MTS12.U0004.Elements.Add((SwiftDefinitionElement) MTS12.U0005);
      MTS12.MessageDefinition.Elements.Add((SwiftDefinitionElement) MTS12.U0004);
    }
  }
}
